<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?><!DOCTYPE html><html lang="en">
	<head>
		<!--加载header文件-->
		<?php
		include_once 'public/views/header.php';
		?>
		<?php
		include_once 'public/home/html/faltSelect.php';
		?>
		<link rel="stylesheet" href="public/css/edit.css" />
		<script src="cust/js/questionEdit.js"></script>
		<script src="public/js/cus_modal.js"></script>
		<script src="public/js/jquery.uploadfile.min.js"></script>
		<script src="cust/js/goodsUpload.js"></script>
		<link href="public/css/uploadfile.css" rel="stylesheet">
	</head>
	<body>
		<div class="role-demo hidden">
			<select style="width:157px" id="role_id" dataType="*" data-val="<?=estr($detail, 'role') ?>" name="sub_role_id[]">
				<?php foreach ($role as $k => $v): ?>
					<option value="<?php echo $v['id']; ?>" <?php if($v['id']==$detail['role_id']) echo 'selected="selected"'; ?>><?php echo $v['name']; ?></option>
				<?php endforeach; ?>
			</select>
			<div class="btn btn-default btn-xs" onclick="delRole(this);">删除</div></br>
		</div>
		<div class="container">
			<div class="row">
				<input type="hidden" id="modal_title" value="<?=$title ?>" />
				<input type="hidden" id="modal_height" value="450" />
				<form id="editForm">
					<input type="hidden" id="id" name="id" value="<?php if($detail['id']){echo $detail['id'];}else{echo '0';}?>" />
					<table class='edit_table'>
						<tr>
							<th>标题</th>
							<td><input type="text" id='title'value="<?=estr($detail, 'title') ?>" dataType="*" ></td>						
						</tr>
						<tr>
							<th>二维码</th>
							<td colspan="3">
							<input type="hidden" name="question_img" value="<?=estr($detail,'img')?>" id="question_img" >
							<img src="<?php echo $detail['img']?$detail['img']:'cust/images/upload.png'; ?>" alt="" style="width:350px;cursor: pointer;" onclick="$(this).next().click();" >
							<input type="file" style="display: none;" name="image_file" onchange="doImage(this);">
							</td>
						</tr>
					</table>
				</form>
				
			</div>
		</div>
	</body>

</html>
